package com.bawei.detail.repos

import com.bawei.common.entity.CommendEntity
import com.bawei.common.entity.MovieEntity
import com.bawei.detail.api.DetailApiServer
import com.bawei.detail.entity.AuthorEntity
import com.bawei.http.ApiBaseResponse
import javax.inject.Inject


class DetailRepository @Inject constructor(private val apiServer: DetailApiServer){


    suspend fun getAuthorById(userId: String): ApiBaseResponse<AuthorEntity>{
        return apiServer.getAuthorById(userId)
    }

    suspend fun getRecommendMultiVideo(page: Int, pageSize: Int): ApiBaseResponse<List<MovieEntity>>{
        return apiServer.getRecommendMultiVideo(page, pageSize)
    }

    suspend fun getMultiVideoByTypeId(typeId: Int, page: Int, pageSize: Int): ApiBaseResponse<List<MovieEntity>>{
        return apiServer.getMultiVideoByTypeId(typeId, page, pageSize)
    }

    suspend fun getVideoCommends(dataType: Int, itemId:String): ApiBaseResponse<List<CommendEntity>>{
        return apiServer.getVideoCommends(dataType, itemId)
    }

}